<template>
  <div class="home">
    <!-- 须将组件GeovisContainer放在最前面，保证在其他组件中使用earth时已完成初始化 -->
    <home-header></home-header>
    <geovis-container></geovis-container>
    <layer-manage></layer-manage>
    <plan-manage></plan-manage>
    <info-box></info-box>
    <!-- <air-line></air-line> -->
    <!-- <el-button style="position: absolute; top: 120px;" @click="getPosition">获取当前视角信息</el-button> -->
  </div>
</template>

<script>
// @ is an alias to /src
import GeovisContainer from './GeovisContainer'
import LayerManage from './LayerManage'
import HomeHeader from './HomeHeader'
import PlanManage from './PlanManage'
import InfoBox from './InfoBox'
// import AirLine from './AirLine'
export default {
  name: 'Home',
  components: {
    GeovisContainer,
    LayerManage,
    HomeHeader,
    PlanManage,
    InfoBox
    // AirLine
  },
  data() {
    return {
      curLon: 0,
      curLat: 0,
      curHeight: 0
    }
  },
  methods: {
    getPosition() {
      console.log(JSON.stringify(this.$earth.viewer.iCamera.viewPoint))
    }
  }
}
</script>
<style lang="scss">
.home {
  width: 100%;
  height: 100%;
}
</style>
